﻿using System;
using System.Linq;
using System.Text;
using Model.Core;
using SIE.SCADA.SqlSugar;

namespace Models
{
    ///<summary>
    ///产品对应的工艺流程及工序工步表
    ///</summary>
    [SugarTable("v_scada_jobsteprecord")]
    public partial class v_scada_jobsteprecord: NotifyPropertyChanged
    {
           public v_scada_jobsteprecord(){


           }
           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:False
           /// </summary>           
           [SugarColumn(IsPrimaryKey=true)]
           public int id {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:False
           /// </summary>           
           public string serial_number {get;set;}

           /// <summary>
           /// Desc:产品编码
           /// Default:
           /// Nullable:False
           /// </summary>           
           public string matid {get;set;}

           /// <summary>
           /// Desc:产品描叙
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string matdesc {get;set;}

           /// <summary>
           /// Desc:Mbom版本
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string mbom {get;set;}

           /// <summary>
           /// Desc:工艺流程编码
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string techprocess {get;set;}

           /// <summary>
           /// Desc:工艺流程版本
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string small_version {get;set;}

           /// <summary>
           /// Desc:工序名称
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string disque_name {get;set;}

           /// <summary>
           /// Desc:工序编码
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string disque_code {get;set;}

           /// <summary>
           /// Desc:此工序是第几道序
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int? disque_qty {get;set;}

           /// <summary>
           /// Desc:工艺流程总共多少工序
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public int? disque_sum {get;set;}

           /// <summary>
           /// Desc:工步名称
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string jobstep {get;set;}

           /// <summary>
           /// Desc:工步编码
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string jobstep_code {get;set;}

           /// <summary>
           /// Desc:创建人
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public string CreateUser_Str {get;set;}

           /// <summary>
           /// Desc:创建时间
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public DateTime? CreateTime_Dt {get;set;}

           /// <summary>
           /// Desc:工序的第几工步
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int? jobstep_id {get;set;}

           /// <summary>
           /// Desc:
           /// Default:CURRENT_TIMESTAMP
           /// Nullable:True
           /// </summary>           
           //public DateTime? createtime_dt {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public string createuser_str {get;set;}

           /// <summary>
           /// Desc:
           /// Default:CURRENT_TIMESTAMP
           /// Nullable:True
           /// </summary>           
           //public DateTime? modifytime_dt {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public string remark_str {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public bool? isenable_bit {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public bool? isactive_bit {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public bool? issync_bit {get;set;}

           /// <summary>
           /// Desc:
           /// Default:1
           /// Nullable:True
           /// </summary>           
           public int? control_mode {get;set;}

           /// <summary>
           /// Desc:状态
           /// Default:0
           /// Nullable:False
           /// </summary>           


        private int _state_int;

        public int state_int
    {
            get { return _state_int; }
            set
            {
                if (value != _state_int)
                {
                    _state_int = value;
                    OnPropertyChanged(nameof(state_int));
                }
            }
        }


        /// <summary>
        /// Desc:工时
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public decimal workhour_num {get;set;}

           /// <summary>
           /// Desc:工单号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string disidno {get;set;}

           /// <summary>
           /// Desc:是否强制过站
           /// Default:
           /// Nullable:True
           /// </summary>           
           public short? isbypass {get;set;}

           /// <summary>
           /// Desc:强制过站用户
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string bypassuser {get;set;}

           /// <summary>
           /// Desc:工时
           /// Default:0
           /// Nullable:False
           /// </summary>           
           public decimal aworkhour_num {get;set;}

           /// <summary>
           /// Desc:结束时间
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public DateTime? endtime_dt {get;set;}

           /// <summary>
           /// Desc:开始时间
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public DateTime? starttime_dt {get;set;}

           /// <summary>
           /// Desc:操作员
           /// Default:
           /// Nullable:True
           /// </summary>           
           //public string opertor {get;set;}

           /// <summary>
           /// Desc:使用站位
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string stationid { get;set;}

        /// <summary>
        /// Desc:工步描叙
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string jobstep_str { get; set; }

        /// <summary>
        /// Desc:第几工步
        /// Default:0
        /// Nullable:True
        /// </summary>           
        //public int? jobstep_id_int { get; set; }

        /// <summary>
        /// Desc:工步元素类别（物料，工具，文件）
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string element_type_str { get; set; }

        /// <summary>
        /// Desc:工步元素名称（如物料A）
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string jobStep_element_str { get; set; }

        /// <summary>
        /// Desc:工步元素编码（如WL0001）
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string element_code_str { get; set; }

        /// <summary>
        /// Desc:工具使用次数或物料数量
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public int? element_qty_int { get; set; }

        /// <summary>
        /// Desc:物料已用次数
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? matusedtimes { get; set; }

        /// <summary>
        /// Desc:是否扫描
        /// Default:
        /// Nullable:True
        /// </summary>           
        public short? isscan_int { get; set; }


        /// <summary>
        /// Desc:工序ID
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? processid { get; set; }

        /// <summary>
        /// Desc:扭矩
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public decimal? torque { get; set; }

        /// <summary>
        /// Desc:角度
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public decimal? angle { get; set; }

        private decimal? _acttorque;

        public decimal? acttorque
        {
            get { return _acttorque; }
            set
            {
                if (value != _acttorque)
                {
                    _acttorque = value;
                    OnPropertyChanged(nameof(acttorque));
                }
            }
        }

        private decimal? _actangle;

        public decimal? actangle
        {
            get { return _actangle; }
            set
            {
                if (value != _actangle)
                {
                    _actangle = value;
                    OnPropertyChanged(nameof(actangle));
                }
            }
        }

        private int _torquestatus;

        public int torquestatus
        {
            get { return _torquestatus; }
            set
            {
                if (value != _torquestatus)
                {
                    _torquestatus = value;
                    OnPropertyChanged(nameof(torquestatus));
                }
            }
        }




    }
}
